
//
//  MTAngelCollectionViewCell.m
//  met
//
//  Created by 李晓俊 on 2019/6/24.
//  Copyright © 2019 李晓俊. All rights reserved.
//

#import "MTAngelCollectionViewCell.h"

@implementation MTAngelCollectionViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        self = [[NSBundle mainBundle]loadNibNamed:@"MTAngelCollectionViewCell" owner:self options:nil].lastObject;
    }
    return self;
}
- (void)setModel:(AngelModel *)model {
    _model = model;
    self.name.text = [NSString stringWithFormat:@"%@",model.nickName];
    if ([[NSString stringWithFormat:@"%@",KUSER.sex] isEqualToString:@"1"]) {
        [self.headImage sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",model.portraitImMin]] placeholderImage:[UIImage imageNamed:@"默认天使男"]];
    }else {
        [self.headImage sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",model.portraitImMin]] placeholderImage:[UIImage imageNamed:@"默认天使女"]];
    }
}
@end
